package delegated_property

//Map 为之可读
fun main(args: Array<String>) {
    val user = MapUser(
            mapOf(
                    "name" to "olive888",
                    "age" to 21
            )
    )
    println("${user.name} - ${user.age}")
}

class MapUser(map: Map<String, Any?>) {
    val name: String by map
    val age: Int by map
}
